interfaces/apparmor: mock presence of overlayfs root
During the release of the snapd 2.37 we noticed that the Debian
builds performed in sbuild are failing on several unit tests. The same
source package would build file in pbuilder.
Investigation uncovered that sbuild is using overlayfs root internally.
This is picked up by the apparmor overlayfs detector and causes snapd to
generate an additional configuration file for snap-confine.
For reference, the offending entry from /proc/self/mountinfo:
228 23 0:40 / / rw,relatime shared:119 - overlay sid-amd64-sbuild rw,lowerdir=/var/lib/schroot/union/underlay/sid-amd64-sbuild-
85592074-da40-4faa-8b25-
a354b207cdf2,upperdir=/var/lib/schroot/union/overlay/sid-amd64-sbuild-
85592074-da40-4faa-8b25-
a354b207cdf2/upper,workdir=/var/lib/schroot/union/overlay/sid-amd64-sbuild-
85592074-da40-4faa-8b25-
a354b207cdf2/work
The extra generated file was upsetting tests that looked at
/var/lib/snapd/apparmor/snap-confine.
Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
Gbp-Pq: Name 0009-interfaces-apparmor-mock-presence-of-overlayfs-root.patch